package com.ppc.ugo.vo;

import jdk.nashorn.internal.objects.annotations.Constructor;
import lombok.AllArgsConstructor;
import lombok.Data;

@Data
@AllArgsConstructor
public class Result {
    //响应数据
    private Object message;
    //响应状态
    private Meta meta;

    public static Result success(Object message){
        Meta meta = new Meta("获取成功", 200);
        return new Result(message, meta);
    }

    public static Result fail(Integer status, String msg){
        return new Result(null, new Meta(msg, status));
    }

}
